package com.yuma.reffunc;

import java.util.UUID;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

public class StaticFunctonRefDemo {
    public static void main(String[] args) {
        // 静态方法引用    R apply(T t) {
        //        return StrictMath.ceil(a); // default impl. delegates to StrictMath
        //    }
        Function<Double,Double> f1 = Math::ceil;
        System.out.println(f1.apply(3.14));  // Math.ceil(3.14)

        Supplier<UUID> s1 = UUID::randomUUID;
        System.out.println(s1.get());  // UUID::randomUUID
    }
}
